package courselection;

public class User {
    public static void main(String[] args) {
        // 创建学生对象
        Student student1 = new Student(001, "张一一", "男", null);
        Student student2 = new Student(002, "李泽言", "女", null);
        // 创建课程对象
        Course course = new Course(001, "Java应用与技术", "教学楼103", "周三第3、4节");
        Course c1 =new Course(002, "线性代数", "主楼2202", "周一第1、2节");
        Course c2 = new Course(003, "马克思主义基本原理概论", "教学楼207", "周三第5、6节");
        //创建教师对象
        Teacher teacher = new Teacher(001, "张老师", "男", null);
        Teacher t1 = new Teacher(002, "王老师", "女", null);
        Teacher t2 = new Teacher(003, "石老师", "男", null);
        // 教师开设课程
        teacher.setTeachCourse(course);
        t1.setTeachCourse(c1);
        t2.setTeachCourse(c2);
        // 学生选课
        student1.setSelectCourse(course);
        student2.setSelectCourse(c1);
        student2.setSelectCourse(c2);
        
        // 学生退课
        student2.dropCourse(c2);

        // 输出学生信息
        System.out.println(student1);
        System.out.println(student2);
        // 输出教师信息
        System.out.println(teacher);
        System.out.println(t2);
    }
}


